﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace SqlSugarCoreDemo.DBSqlSugar
{
    /// <summary>
    /// 管理员表
    /// </summary>
    [SugarTable("SysManager", TableDescription = "管理员表")]
    public partial class SysManager
    {
        /// <summary>
        /// 管理员ID
        /// </summary>
        [Display(Name = "管理员ID")]
        [SugarColumn(ColumnDescription = "管理员ID", IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 管理员角色ID集合：1,2,3
        /// </summary>
        [Display(Name = "角色ID集合")]
        [SugarColumn(ColumnDescription = "角色ID集合")]
        [Required(ErrorMessage = "请选择{0}")]
        public string managerRoleIds { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [Display(Name = "用户名")]
        [SugarColumn(ColumnDescription = "用户名")]
        [StringLength(25, ErrorMessage = "【{0}】不能超过{1}长度")]
        public string userName { get; set; }
        /// <summary>
        /// 登录密码
        /// </summary>
        [Display(Name = "登录密码")]
        [SugarColumn(ColumnDescription = "登录密码")]
        [Required(ErrorMessage = "请输入{0}")]
        public string password { get; set; }
        /// <summary>
        /// 秘钥(6位随机字符串)
        /// </summary>
        [Display(Name = "秘钥")]
        [SugarColumn(ColumnDescription = "秘钥")]
        [Required(ErrorMessage = "请输入{0}")]
        public string salt { get; set; }
        /// <summary>
        /// 管理员姓名
        /// </summary>
        [Display(Name = "管理员姓名")]
        [SugarColumn(ColumnDescription = "管理员姓名", IsNullable = true)]
        public string realName { get; set; }
        /// <summary>
        /// 联系手机号
        /// </summary>
        [Display(Name = "联系手机号")]
        [SugarColumn(ColumnDescription = "联系手机号", IsNullable = true)]
        public string mobile { get; set; }
        /// <summary>
        /// 联系邮箱
        /// </summary>
        [Display(Name = "联系邮箱")]
        [SugarColumn(ColumnDescription = "联系邮箱", IsNullable = true)]
        public string email { get; set; }
        /// <summary>
        /// 状态：1 正常，2 锁定
        /// </summary>
        [Display(Name = "状态")]
        [SugarColumn(ColumnDescription = "状态")]
        public byte state { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        [Display(Name = "添加时间")]
        [SugarColumn(ColumnDescription = "添加时间")]
        public DateTime? addTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [SugarColumn(ColumnDescription = "修改时间", IsNullable = true)]
        public DateTime? updateTime { get; set; }
    }
}
